#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
#define rep(i, a, b) for (int i = (a); i <= (b); i++)
#define per(i, a, b) for (int i = (a); i >= (b); i--)
#define endl '\n'
const int N = 1005;
const int M = 205;
const int K = 205;
const int MOD = 1e9 + 7;

int n, m, u;
char a[N], b[M];
ll dp[2][M][M][2];

int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n >> m >> u;
  rep(i, 1, n) cin >> a[i];
  rep(i, 1, m) cin >> b[i];
  dp[0][0][0][0] = 1;
  rep(i, 1, n) {
    int now = i & 1;
    int pre = (i - 1) & 1;
    memset(dp + now, 0, sizeof(dp[0]));
    dp[now][0][0][0] = 1;
    rep(j, 1, min(i, m)) {
      rep(k, 1, min(j, u)) {
        dp[now][j][k][0] = (dp[pre][j][k][0] + dp[pre][j][k][1]) % MOD;
        if (a[i] == b[j]) {
          dp[now][j][k][1] = (dp[pre][j - 1][k][1] + dp[pre][j - 1][k - 1][0] +
                              dp[pre][j - 1][k - 1][1]) %
                             MOD;
        } else {
          dp[now][j][k][1] = 0;
        }
      }
    }
  }
  cout << (dp[n & 1][m][u][0] + dp[n & 1][m][u][1]) % MOD;
  return 0;
}